package com.wxj.bank.module.exceptions;

import com.wxj.bank.module.enums.ExceptionEnum;

/**
 * @author shengtao
 * @Description: 系统异常
 * @date 2019/01/30 11:44
 */
public class BankException extends RuntimeException {

    private String errCode;

    public BankException(String errCode,String message) {
        super(message);
        this.errCode = errCode;
    }

    public BankException(ExceptionEnum exceptionEnum){
        super(exceptionEnum.getMsg());
        this.errCode = exceptionEnum.getCode();
    }

    public String getErrCode() {
        return errCode;
    }

    public String getMsg(){
        return this.getMessage();
    }

}
